Skip to content

fix(iOS): migrate from RCTSharedApplication() for RCTDeviceInfo's RCTIsIPhoneNotched method#47220

Closed
TheRogue76 wants to merge 2 commits into
facebook:mainfrom
TheRogue76:main
Closed

fix(iOS): migrate from RCTSharedApplication() for RCTDeviceInfo's RCTIsIPhoneNotched method#47220
TheRogue76 wants to merge 2 commits into
facebook:mainfrom
TheRogue76:main

Conversation

@TheRogue76
Copy link
Copy Markdown
Contributor

@TheRogue76 TheRogue76 commented Oct 26, 2024

Summary:

Far as i can see it, this is the last direct reference to how we used to get windows before the introduction of scenes. Everything now uses the new Scenes system (potentially we could start adding a RCTSceneDelegate if we ever want to move in that direction)

I also threw in a nullability check. Theoretically, that shouldn't happen, but honestly, who knows what platform will come in the future, better safe than sorry. Let me know if you think i should remove it

Changelog:

[INTERNAL] [FIXED] - Potentially Migrate the last KeyWindow usage to RCTKeyWindow instead of tapping to the UIWindow directly via RCTSharedApplication

Test Plan:

yarn test:
Screenshot 2024-10-26 at 23 48 22
iOS test: Sadly it seems like it is still broken on Xcode 16 on my machine. Will leave it up to the CI to test it. I can see that there are more that are potentially broken. Might try to take a look and see if i can fix it in another PR.
Screenshot 2024-10-26 at 23 53 47

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Oct 26, 2024
Copy link
Copy Markdown
Contributor

@cipolleschi cipolleschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for this small refactor!

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Oct 29, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@cipolleschi merged this pull request in c1e964a.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @TheRogue76 in c1e964a

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants